-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Widgetfactory classify polygon #301
Conversation
if isinstance(layer, QgsVectorLayer): | ||
fields = [field.name() for field in layer.fields()] | ||
self.field_selector.addItems(fields) | ||
print(f"[ClassifyPolyIntoClassesWidget] Fields added: {fields}") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do not use print please. Use The QgsLogMessage class
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Changes made and tested
@@ -0,0 +1,70 @@ | |||
from qgis.PyQt.QtWidgets import QWidget, QVBoxLayout, QLabel, QComboBox | |||
from qgis.PyQt.QtCore import pyqtSignal | |||
from qgis.gui import QgsMapLayerComboBox |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
QgsFieldComboBox
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Changes made and tested
self.layer_selector.setFilters(QgsMapLayerProxyModel.PolygonLayer) | ||
self._layout.addWidget(self.layer_selector) | ||
|
||
# Field selector |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
QgsFieldComboBox
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Changes made and tested
…y_poly_into_classes_widget.py
No description provided.